package com.example.administrator.zyfypt111pzy.fragment;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.example.administrator.zyfypt111pzy.R;
import com.example.administrator.zyfypt111pzy.bean.SessionIDBean;

public class MyFragment extends Fragment {
    private View view=null;
    private Context context;
    private SessionIDBean sessionIDBean;
    private TextView realName;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        context=getActivity();
        //动态加载Fragment1的布局文件
        view=inflater.inflate(R.layout.mysavelayout,container,false);
        realName=(TextView)view.findViewById(R.id.tv_realName);
        if(sessionIDBean.realName.equals("")){
            realName.setText("您注册时未填写真实姓名");
        }else {
            realName.setText("真实姓名：" + sessionIDBean.realName);
        }
        return view;
    }
}
